| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

Public Member Functions | Static Public Attributes | List of all members
nkGraphics::CameraManager Class Referencefinal

Manages the cameras recorded. More...

Inheritance diagram for nkGraphics::CameraManager:

## Public Member Functions
Camera * | getActiveRenderCamera () const
Camera * | getActiveCullingCamera () const
Camera * | getActiveLodCamera () const
Camera * | getDefaultCamera () const
void | setActiveRenderCamera (Camera *cam)
void | setActiveCullingCamera (Camera *cam)
void | setActiveLodCamera (Camera *cam)
void | setDefaultCamera (Camera *cam)
void | resetRenderCameraToDefault ()
void | resetCullingCameraToDefault ()
void | resetLodCameraToDefault ()
void | prepareForContext (RenderContext *context)
Public Member Functions inherited from nkGraphics::Manager< Camera >
Camera * | createOrRetrieve (nkMemory::StringView name)
Camera * | record (nkMemory::StringView name, nkMemory::UniquePtr< Camera > resource)
Camera * | get (nkMemory::StringView name) const
Camera * | getByIndex (unsigned int index) const
void | rename (nkMemory::StringView currentName, nkMemory::StringView newName)
void | erase (nkMemory::StringView name)
nkMemory::UniquePtr< Camera > | relinquish (nkMemory::StringView name)

## Static Public Attributes
static nkMemory::StringView | DEFAULT_CAMERA = "NILKINS_DEFAULT_CAMERA"
| Name for the default camera. More...

## Detailed Description

Manages the cameras recorded.

Camera creation / deletion can go through this class, allowing it to act as a repository of resources which lifetime will get managed as needed. Like any Manager, it is always owning the memory it owns, unless it passes back the ownership explicitly.

## Member Function Documentation

## ◆ getActiveRenderCamera()

Camera* nkGraphics::CameraManager::getActiveRenderCamera | ( |  | ) | const

Returns
  The current active render camera.

## ◆ getActiveCullingCamera()

Camera* nkGraphics::CameraManager::getActiveCullingCamera | ( |  | ) | const

Returns
  The current active culling camera.

## ◆ getActiveLodCamera()

Camera* nkGraphics::CameraManager::getActiveLodCamera | ( |  | ) | const

Returns
  The current active lod camera.

## ◆ getDefaultCamera()

Camera* nkGraphics::CameraManager::getDefaultCamera | ( |  | ) | const

Returns
  The default camera to use.

## ◆ setActiveRenderCamera()

void nkGraphics::CameraManager::setActiveRenderCamera | ( | Camera * | cam | ) |

Sets the active render cam to use. Serves as a reference for feeding shaders with matrices during a pass.

Parameters

  cam | The camera to use.

## ◆ setActiveCullingCamera()

void nkGraphics::CameraManager::setActiveCullingCamera | ( | Camera * | cam | ) |

Sets the active culling cam to use. Serves as a reference for culling render queues rendered during a pass.

Parameters

  cam | The camera to use.

## ◆ setActiveLodCamera()

void nkGraphics::CameraManager::setActiveLodCamera | ( | Camera * | cam | ) |

Sets the active lod cam to use. Serves as a reference for selecting LOD during a pass.

Parameters

  cam | The camera to use.

## ◆ setDefaultCamera()

void nkGraphics::CameraManager::setDefaultCamera | ( | Camera * | cam | ) |

Sets the default cam to use when no camera is specified for a pass.

Parameters

  cam | The camera to use.

## ◆ resetRenderCameraToDefault()

void nkGraphics::CameraManager::resetRenderCameraToDefault | ( |  | ) |

Resets the rendering cam to the default one.

## ◆ resetCullingCameraToDefault()

void nkGraphics::CameraManager::resetCullingCameraToDefault | ( |  | ) |

Resets the culling cam to the default one.

## ◆ resetLodCameraToDefault()

void nkGraphics::CameraManager::resetLodCameraToDefault | ( |  | ) |

Resets the LOD cam to the default one.

## ◆ prepareForContext()

void nkGraphics::CameraManager::prepareForContext | ( | RenderContext * | context | ) |

Prepare the active cameras with the ones that have been set for a context.

Parameters

  context | The context that should populate the active cameras.

Remarks
  This method is called when setting up a context for rendering. If such a setup is required, it is probably safer to directly call RenderContextManager::activateContext(), to ensure the context setup is complete.

## Member Data Documentation

## ◆ DEFAULT_CAMERA

nkMemory::StringView nkGraphics::CameraManager::DEFAULT_CAMERA = "NILKINS_DEFAULT_CAMERA"
| inline static

Name for the default camera.

The name of the default camera used in the engine. If no camera is overloaded during passes, then this camera is the one used for everything. It can be retrieved using this field for easy edition.

The documentation for this class was generated from the following file:

- Documentation/Headers/NilkinsGraphics/Cameras/CameraManager.h